namespace GGPhysics.Internal
{
	public static class MathEx
	{
		public static float Min(float a, float b)
		{
			return (!(a < b)) ? b : a;
		}

		public static int Min(int a, int b)
		{
			return (a >= b) ? b : a;
		}

		public static float Max(float a, float b)
		{
			return (!(a > b)) ? b : a;
		}

		public static int Max(int a, int b)
		{
			return (a <= b) ? b : a;
		}

		public static float Min(float a, float b, float c)
		{
			return (a < b) ? ((!(a < c)) ? c : a) : ((!(b < c)) ? c : b);
		}

		public static float Max(float a, float b, float c)
		{
			return (a > b) ? ((!(a > c)) ? c : a) : ((!(b > c)) ? c : b);
		}

		public static void Swap(ref float a, ref float b)
		{
			float num = a;
			a = b;
			b = num;
		}
	}
}
